#etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
 
PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="/bin/vi"			# needed for packages like cron
test -z "$TERM" && TERM="vt100"	# Basic terminal capab. For screen etc.

#if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
#	TZ="UTC"		# Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html 
#				# for an explanation of how to set this to your local timezone.
#	export TZ
#fi

if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
    if [ -f /jffs2/dst_file.txt ]; then
        TZ=$(cat /jffs2/dst_file.txt)
        export TZ
    else
        TZ="UTC"
        export TZ
    fi
fi

if [ "`id -u`" -eq 0 ]; then
   PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
fi
if [ "$PS1" ]; then
# works for bash and ash (no other shells known to be in use here)
   PS1='\u@\h:\w\$ '
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi

export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM

umask 022

alias ll='ls -l --color=auto'

export QTDIR=/opt/QT4.8.6/
export QT_QWS_FONTDIR=/opt/QT4.8.6/lib/fonts
export LD_LIBRARY_PATH=/opt/QT4.8.6/lib:/mnt/qtlib/tslib/lib
export QT_PLUGIN_PATH=/opt/QT4.8.6/plugins/

export TSLIB_ROOT=/mnt/qtlib/tslib
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=/mnt/qtlib/tslib/lib/ts
export TSLIB_CONFFILE=/mnt/qtlib/tslib/etc/ts.conf
export POINTERCAL_FILE=/mnt/jffs2/pointercal
export TSLIB_CALIBFILE=/mnt/jffs2/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export QWS_DISPLAY=LinuxFb:/dev/fb0
